package cn.pegasus.teamwork.pegasus.service.impl;

import java.util.HashMap;
import java.util.List;
import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import cn.pegasus.teamwork.pegasus.entity.BussUserOpinion;
import cn.pegasus.teamwork.pegasus.entity.BussWasherFundstatistics;
import cn.pegasus.teamwork.pegasus.mapper.BussWasherFundstatisticsMapper;
import cn.pegasus.teamwork.pegasus.service.BussWasherFundstatisticsService;
import cn.iyizhan.teamwork.base.service.impl.BaseServiceImpl;
import cn.iyizhan.teamwork.base.util.PageHelper;
import cn.iyizhan.teamwork.base.util.PageObject;

/**
 * @author ryan.bian
 * @version 
 */
@Service("washerFundstatisticsService")
public class BussWasherFundstatisticsServiceImpl extends BaseServiceImpl<BussWasherFundstatistics, BussWasherFundstatisticsMapper> implements BussWasherFundstatisticsService {
	// 注入当前dao对象
    @Autowired
    private BussWasherFundstatisticsMapper bussWasherFundstatisticsMapper;

    public BussWasherFundstatisticsServiceImpl() {
        setMapperClass(BussWasherFundstatisticsMapper.class, BussWasherFundstatistics.class);
    }

	@Override
	public PageObject<BussWasherFundstatistics> PageList(Map<String, Object> map) {
		int totalData = bussWasherFundstatisticsMapper.getTotal(map);
        PageHelper pageHelper = new PageHelper(totalData, map);
        List<BussWasherFundstatistics> list = bussWasherFundstatisticsMapper.findAccountByPage(pageHelper.getMap());
        PageObject<BussWasherFundstatistics> pageObject = pageHelper.getPageObject();
        pageObject.setDataList(list);
		return pageObject;
	}

	@Override
	public BussWasherFundstatistics findDeposit(Integer washerId) {
		Map<String,Object> map = new HashMap<String,Object>();
		map.put("washerId", washerId);
		BussWasherFundstatistics washer = bussWasherFundstatisticsMapper.findDeposit(map);
		return washer;
	}
    
	
 
}
